<template>
	<view class="my-container">
		<!-- <my-login v-if="!token"></my-login> -->
		
		<!-- <my-userinfo></my-userinfo> -->
		
		<!-- 普通用户 -->
		<role-user v-if=" userInfo.role === 'ROLE_USER'"></role-user>
		
		<!-- 超级管理员 -->
		<role-admin v-else-if=" userInfo.role === 'ROLE_ADMIN' "></role-admin>
	</view>
</template>

<script>
	import { mapState } from 'vuex'
	
	export default {
		data() {
			return {
				
			};
		},
		
		// 映射user.js中的token信息
		computed: {
			...mapState('m_user',['token','userInfo'])
		}
	}
</script>

<style lang="scss">

page, .my-container{
	height: 100%;
}

</style>
